#ifndef _EKU_RPC_H_
#define _EKU_RPC_H_

int rpc_send(uint16_t pidx, uint32_t func);
void rpc_wait(void);

int rpc_recv(uint16_t *pidx, uint32_t *func, struct pipe_t **in_pipe, struct pipe_t **out_pipe);
void rpc_return(uint16_t pidx, struct pipe_t *in_pipe, struct pipe_t *out_pipe);

int rpc_init(void);

extern struct pipe_t *rpc_in_pipe, *rpc_out_pipe;

/* 标准的 RPC 头 */
#define RPC_HEADER 0x12345678

#endif /* _EKU_RPC_H_ */
